{% load static %}

<div class="container">
    <nav class="navbar navbar-default" role="navigation">
        <div class="navbar-header">
            <a href="/" class="navbar-brand" style="padding: 0">
                <img src="{% static 'images/logo.png' %}" alt="logo" width="50px">
            </a>
        </div>
        <div>
            <ul class="nav navbar-nav" role="navigation">
                <li><a href="{% url 'blog:blog_title' %}">博客</a></li>
            </ul>
            <ul class="nav navbar-nav" role="navigation">
                <li><a href="{% url 'aboutus:main' %}">关于我们</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right" style="margin-right: 10px">
                {% if user.is_authenticated %}
                <li><a href="#">用户: {{ user.username }}</a></li>
                <li><a href="{% url 'account:user_logout' %}">登出</a></li>
                {% else %}
                <li><a href="{% url 'account:user_login' %}">登陆</a></li>
                <li><a href="{% url 'account:user_register' %}">注册</a></li>
                {% endif %}
            </ul>
        </div>
    </nav>
</div>